﻿using MyDay13.IRepostitype;
using MyDay13.IService;
using MyDay13.Models;
using MyDay3.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Day13Service
{
    public class TreeService : ITreeService
    {
        ITreeRepostitype tree;
        public TreeService(ITreeRepostitype treeRepostitype)
        {
            tree = treeRepostitype;
        }

        public int Login(string name, string pwd)
        {
            return tree.Login(name, pwd);
        }

        public List<MenoTo> MenoShow(int pid)
        {
            return tree.MenoShow(pid);
        }

        public List<PrwerTo> PrwerShow(int pid)
        {
            return tree.PrwerShow(pid);
        }

        public int RPdistribution(int rid, string pid)
        {
            return tree.RPdistribution(rid,pid);
        }

        public List<ViewRP> RPShow()
        {
            return tree.RPShow();
        }

        public int URdistribution(int uid, string rid)
        {
            return tree.URdistribution(uid, rid);
        }

        public List<PrwerTo> URPShow(int id)
        {
            return tree.URPShow(id);
        }

        public List<ViewUR> URShow()
        {
            return tree.URShow();
        }
    }
}
